import request from '@/utils/request'

// export const loginApi = data => request.post('http://localhost:8888/api/sys/login', data)

export const loginApi = (data) => {
  return request({
    url: '/sys/login',
    method: 'POST',
    data
  })
}

// 获取用户信息
export function getUserInfoApi(token) {
  return request({
    method: 'post',
    url: '/sys/profile'
  })
}
// 获取用户信息(头像)
export function getBaseUserInfoApi(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
